home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19981211-19990422
/
000182_news@watsun.cc.columbia.edu _Tue Feb 2 13:20:32 1999.msg
< prev
next >
Wrap
Internet Message Format
|
1999-04-21
|
2KB
Return-Path: <news@watsun.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id NAA29653
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 2 Feb 1999 13:20:31 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id NAA09060
for kermit.misc@watsun.cc.columbia.edu; Tue, 2 Feb 1999 13:19:00 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Subject: Re: Serial Line
Date: 2 Feb 1999 18:19:00 GMT
Organization: Columbia University
Message-ID: <797fik$8r1$1@newsmaster.cc.columbia.edu>
To: kermit.misc@mailrelay2.cc.columbia.edu
In article <797esf$k18$1@news.cs.tu-berlin.de>,
Janko Dimitroff <janko@cs.tu-berlin.de> wrote:
: I have a problem using kermit.
:
: I want to communicate with a device which is plugged in the serial line. I
: wrote a script which is able to establish a connection to the device. Now
: the device sends data. How can I check these data, read it to variables and
: so on.
:
: I want to send data to the device if a string containing a special substring
: was received by the computer. On account of the fact that I do not know
: exactly what data (only a substring) comes in I can not use INPUT or MINPUT.
:
: Can I just wait for \n ?
:
Yes:
INPUT <number> \10 (or \13, or \10,\13)
: How is data handled by INPUT/MINPUT if it does not match with the
: given text?
:
As explained in the manual, it is stored in the \v(input) variable, which
represents a circular buffer.
: You understood my problem hopefully and have a solution.
If you know what the substring, why don't you just look for it?
If you don't know what you are looking for, how will find it?
You can use INPUT or MINPUT to look for strings, or you can use them
to read "lines" of text as follows:
while true {
input 20 \13\10 ; Read a line
if fail ... ; Do something if INPUT times out
; Process the line here
; The \v(input) variable
; contains the line.
clear input ; Clear the input buffer and wait
} ; for another line.
See the manual for details:
http://www.columbia.edu/kermit/ck60manual.html
- Frank